NotEqual
逐元素计算两个输入是否不相等
\[\begin{split}output_i = \begin{cases}
\text{True}, & \text{if } Input0_i \neq Input1_i \\
\text{False}, & \text{if } Input0_i = Input1_i
\end{cases}\end{split}\]
- 输入:
Input0 - 第一个输入数据地址。
Input1 - 第二个输入数据地址。
length - 计算长度。
core_mask(int, 可选) - 核掩码(仅适用于共享存储版本)。
- 输出:
output - 计算结果地址。
- 支持平台:
FT78NEMT7004
备注
FT78NE 支持 int8, int16, int32, fp32, fp64, cplx64, cplx128
MT7004 支持 fp16, fp32, int16, int32, cplx64
共享存储版本:
-
void i8_not_equal_s(int8_t *Input0, int8_t *Input1, bool *output, int length, int core_mask)
-
void i16_not_equal_s(int16_t *Input0, int16_t *Input1, bool *output, int length, int core_mask)
-
void i32_not_equal_s(int *Input0, int *Input1, bool *output, int length, int core_mask)
-
void hp_not_equal_s(half *Input0, half *Input1, bool *output, int length, int core_mask)
-
void fp_not_equal_s(float *Input0, float *Input1, bool *output, int length, int core_mask)
-
void dp_not_equal_s(double *Input0, double *Input1, bool *output, int length, int core_mask)
-
void c64_not_equal_s(float *Input0, float *Input1, bool *output, int length, int core_mask)
-
void c128_not_equal_s(double *Input0, double *Input1, bool *output, int length, int core_mask)
C调用示例:
1//FT78NE示例 2#include <stdio.h> 3 4int main(int argc, char* argv[]) { 5 float *input0 = (float *)0xA0000000; //input在DDR空间 6 float *input1 = (float *)0xB0000000; 7 bool *output = (bool *)0xC0000000; 8 int length = 1000; 9 int core_mask = 0xff; 10 fp_not_equal_s(input0, input1, output, length, core_mask); 11 return 0; 12}
私有存储版本:
-
void i8_not_equal_p(int8_t *Input0, int8_t *Input1, bool *output, int length)
-
void i16_not_equal_p(int16_t *Input0, int16_t *Input1, bool *output, int length)
-
void i32_not_equal_p(int32_t *Input0, int32_t *Input1, bool *output, int length)
-
void hp_not_equal_p(half *Input0, half *Input1, bool *output, int length)
-
void fp_not_equal_p(float *Input0, float *Input1, bool *output, int length)
-
void dp_not_equal_p(double *Input0, double *Input1, bool *output, int length)
-
void c64_not_equal_p(float *Input0, float *Input1, bool *output, int length)
-
void c128_not_equal_p(double *Input0, double *Input1, bool *output, int length)
C调用示例:
1//MT7004示例 2#include <stdio.h> 3 4int main(int argc, char* argv[]) { 5 float *input0 = (float *)0x10000000; 6 float *input1 = (float *)0x10001000; 7 bool *output = (bool *)0xC0000000; 8 int length = 1000; 9 fp_not_equal_p(input0, input1, output, length); 10 return 0; 11}